home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1997 January / Macworld (1997-01).dmg / Shareware World / Maths & Science / DynRisk 4.0.3 / DynRisk-Help / DynRisk-Help.rsrc / TEXT_4622.txt < prev    next >
Text File  |  1996-08-30  |  2KB  |  24 lines

  1. The ‚ÄúEvent‚Äù popup menu is used to choose the event type. A HyperCard event supports the following event types:
  2.  
  3.     ‚Ä¢ Do script
  4.     ‚Ä¢ Evaluate
  5.  
  6. Do script
  7.  
  8. The ‚ÄúDo script‚Äù event is used together with the ‚ÄúScript‚Äù field. By entering scripts in HyperTalk syntax into the ‚ÄúScript‚Äù field, you can have HyperCard executing these scripts during a simulation. We refer to the HyperCard manuals for further information. 
  9.  
  10. Since the ‚ÄúScript‚Äù field only allows very short scripts, most of the time you would be better off by writing the script inside a HyperCard stack, and then just call this script from DynRisk.
  11.  
  12. In addition to this, there are a few things you need to be aware of when writing scripts.
  13.  
  14. 1) If you want to include the input value of the event in a script, use the placeholder character ‚Äò‚Ķ‚Äô. [Option-.] DynRisk will then replace the placeholder by the input value before passing the script over to HyperCard. You can use as many placeholders as you like in your scripts.
  15.  
  16. 2) If you want the result value of the script (if there are one) to be passed on to the successors of the event, be sure to check the ‚ÄúExpect script reply‚Äù option checkbox. Otherwise the event will just pass on zero.
  17.  
  18. Evaluate
  19.  
  20. The ‚ÄúEvaluate‚Äù event is used to read the contents of a HyperCard field back to DynRisk. The location of the field is entered into the ‚ÄúScript‚Äù field, by using HyperCard syntax, e.g., as follows:
  21.  
  22.     card field myField
  23.  
  24. Note that since the ‚ÄúEvaluate‚Äù event always returns something back to DynRisk, you do not need to check the ‚ÄúExpect script reply‚Äù option checkbox for this event type. In fact DynRisk will not allow you to check it.